package com.example.springretrydemo.test;

import net.sf.cglib.proxy.Enhancer;

public class SpringRetryProxy {

    public static Object newProxyInstance(Object target){
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(target.getClass());
        enhancer.setCallback(new AnnotationAwareRetryOperationsInterceptor());
        return enhancer.create();
    }
}
